<template>
    <transition name="fade"><h1 v-if="showTitle">这是首页</h1></transition>
    <button @click="showTitle = !showTitle">首页</button>
    <h1>你的评分是 {{score}}</h1>
    <Rate v-model="score" :theme="'black'" />
    <TodoList />
</template>

<script setup>
import {ref} from 'vue'
import TodoList from '../components/TodoList.vue'
import Rate from '../components/Rate.vue'
let score = ref(3)
let showTitle = ref(true)
function update(num) {
    score.value = num
}
</script>

<style scoped>
.fade-enter-active, .fade-leave-active {
    transition: opacity 0.5s linear;
}
.fade-enter-from, .fade-leave-to {
    opacity: 0;
}
</style>